package com.xlserver.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.xlserver.domain.Counselor;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface CounselorMapper extends BaseMapper<Counselor> {
    @Select("SELECT cid,cName AS name,cUsername AS username,cAverageGrade AS averageGrade,cQuestsCompleted AS questsCompleted,cSchedule AS schedule,cProfilePhoto AS profilePhoto,cConsultationTime AS consultationTime,cGender AS gender,cTitle AS title,cJob AS job,cEmail AS email,cIdNumber AS idNumber,cAge AS age,cPhoneNum AS phoneNum FROM counselor_info where SUBSTRING(cSchedule,#{weekIndex},1)=1")
    List<Counselor> selectTodayCounselor(int weekIndex);
}
